import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userinfo: {}
  },
  getters: {},
  mutations: {
    userchang(state,userinfo){
      // console.log(userinfo);
      localStorage.setItem('userinfo',JSON.stringify(userinfo))
      state.userinfo = JSON.parse(localStorage.getItem('userinfo'))
    }
  },
  actions: {},
  modules: {}
})
